<template>
	<view class="top_upload">
		<!-- <view class="top_name">上传图片</view> -->
		<view class="top_card">
			<vUpload ref="uUpload" :action="action" :auto-upload="true" max-count="9"></vUpload>
		</view>
	</view>	
</template>

<script>
	import vUpload from 'pages/user/components/v-upload.vue'
export default {
    props: {
        img: {
            type: String,
            default: [],
        },
    },
    components: {
		vUpload
	},
    data() {
        return {
			action: 'http://192.168.100.196:8844/upload/base64', // 演示地址
			showUploadList: false, 
			lists: [],
			filesArr: []
		};
    },
    computed: {},
    methods: {
		submit() {
			let files = [];
			// 通过filter，筛选出上传进度为100的文件(因为某些上传失败的文件，进度值不为100，这个是可选的操作)
			files = this.$refs.uUpload.lists.filter(val => {
				return val.progress == 100;
			})
			// 如果您不需要进行太多的处理，直接如下即可
			// files = this.$refs.uUpload.lists;
			// console.log(files)
		}
	},
    beforeCreate() {},
    created() {},
    beforeMount() {},
    mounted() {},
    beforeUpdate() {},
    updated() {},
    beforeDestroy() {},
    destroyed() {},
};
</script>

<style lang="scss" scoped>
	.top_upload{
		.top_card{
			.top_name{
				padding-left: 8rpx;
			}

		}
	}
</style>
